<extend name="./Public/Template/base.html" />

<block name="style">
<style type="text/css">
.cont table{border:1; border-collapse:collapse; width:80%; text-align:left; margin:20px; border-color:#CCC;}
.cont table th{background-color:#6CC; color:#FFF; padding:10px 10px; font-weight:normal; font-size:12px;}
.cont table td{ padding:5px 10px; font-size:12px; color:#555;}
.cont table tr:nth-child(2n+1){background-color:rgba(200,200,200,0.2);}
</style>
</block>

<block name="cont">
	<div class="title">英雄列表
        <button class="buttonA">导出XML</button>
        <button class="buttonA">增加</button></div>
    
    <hr size="1" align="right" class="cut_solid">
    
    <div class="table_cont">
    	<table border="1">
        	<tr><th>英雄ID</th><th>英雄名称</th><th>操作</th></tr>
        	<foreach name="hero_list" item="hero">
            	<tr><td>{$hero.hero_id}</td><td>{$hero.hero_name}</td>
                <td><a href="detailHero?hero_id={$hero.hero_id}" target="_blank">HTML展示</a> 
                	<a onClick="deleteHero({$hero.hero_id})">删除</a></td></tr>
            </foreach>
       	</table>
    </div>
</block>

<block name="script">
<script language="javascript">
$("li").eq(1).css("background-color","#69C");
function btnAdd(){ window.open("addHero?ops_type=add", "_self");}
function deleteHero(hero_id){
	var is_del	= confirm("确定删除该条目吗?");
	if(is_del){
		window.open("deleteHero?hero_id="+hero_id, "_self");
	}
}

function outXML(){
	window.open("outXML", "_blank");
}
</script>
</block>